//
//  KZVocabularyImproveTitleView.m
//  听说弱点强化训练
//
//  Created by 朱凯 on 2018/8/22.
//  Copyright © 2018年 盛超. All rights reserved.
//

#import "KZVocabularyImproveTitleView.h"

@implementation KZVocabularyImproveTitleView
{
    UILabel *_letterIndexLabel;
    UILabel *_letterCountLabel;
    UILabel *_trainDurationLabel;
}
- (instancetype)init {
    
    if (self = [super init]) {
        
        [self setupUI];
    }
    return self;
}
- (void)setupUI {
    
    _letterIndexLabel = [[UILabel alloc] init];
    _letterIndexLabel.text = @"第一个";
    _letterIndexLabel.font = FONT(12);
    _letterIndexLabel.textAlignment = NSTextAlignmentLeft;
    _letterIndexLabel.textColor = KZThemeColor;
    [self addSubview:_letterIndexLabel];
    [_letterIndexLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@10);
        make.top.height.equalTo(self);
    }];
    
    _letterCountLabel = [[UILabel alloc] init];
    _letterCountLabel.text = @"(第一个包共20个词汇)";
    _letterCountLabel.font = FONT(12);
    _letterCountLabel.textAlignment = NSTextAlignmentLeft;
    _letterCountLabel.textColor = [UIColor lightGrayColor];
    [self addSubview:_letterCountLabel];
    [_letterCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_letterIndexLabel.mas_right);
        make.top.height.equalTo(self);
    }];
    
    _trainDurationLabel = [[UILabel alloc] init];
    _trainDurationLabel.text = @"本次训练时长:00:02:54";
    _trainDurationLabel.font = FONT(12);
    _trainDurationLabel.textAlignment = NSTextAlignmentRight;
    _trainDurationLabel.textColor = [UIColor grayColor];
    [self addSubview:_trainDurationLabel];
    [_trainDurationLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@-10);
        make.top.height.equalTo(self);
    }];
    
    UIView *line = [UIView new];
    line.backgroundColor = [UIColor colorWithWhite:0.85 alpha:1];
    [self addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self);
        make.height.equalTo(@1);
    }];
    
}
@end
